<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        用户名: <input type="text" v-model.trim="user.username"><br>
        密码: <input type="text" v-model.number="user.password"><br>
        性别: <input type="radio" value="male" name="gender" v-model="user.gender">男<br>
              <input type="radio" value="female" name="gender" v-model="user.gender">女<br>
        爱好: <input type="checkbox" value="a1" v-model="user.hobby">唱歌
              <input type="checkbox" value="a1" v-model="user.hobby">跳舞
              <input type="checkbox" value="a1" v-model="user.hobby">rap
        地址: <select>
              <option value="d1">四川</option>
              <option value="d2">云南</option>
              <option value="d3">贵州</option>
        </select><br>
        介绍：<textarea cols="30" rows="10"></textarea>
        <button >提交</button><br>
        {{user}}
    </div>
    <script>
        var vm = new Vue({
            el:'#app',
            data:{
                user:{
                    hobby:[]
                }
            },
            methods:{
                click1(){
                    var data = JSON.stringify(this.user);
                    console.log(data);
                
                }

            }     
        })
    </script>
    
</body>
</html>